home *** CD-ROM | disk | FTP | other *** search
- Path: keats.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.c
- Subject: Re: __argv[0] bug under Win 95?
- Date: 10 Mar 1996 11:55:32 -0800
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4hvc3kINNeq@keats.ugrad.cs.ubc.ca>
- References: <4hr196$1hl@murphy2.servtech.com>
- NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
-
- In article <4hr196$1hl@murphy2.servtech.com>,
- Terry Carmen <tpcarmen@servtech.com> wrote:
- >For some reason __argv[0] is empty under Windows 95, but contains the program name
-
- __argv is not part of the C standard.
-
-
- >and path as it should under Win 3.1x and Win NT.
- >
- >Does anybody have any idea why, or how I can obtain the name of the currently
- >executing (16 bit) app under Win 95?
-
- A C program can determine its name by looking at the string argv[0], assuming
- that you have defined your main as ``int main(int argc, char *argv[])''.
- On systems where the program name is not available, argv[0][0] is zero.
- --
-
-